//auto gen by paipai.java.augogen ver 154
//author floatman
#ifndef _ACACCOUNTDAO_ACACCOUNT_H_
#define _ACACCOUNTDAO_ACACCOUNT_H_

#include <stdint.h>
#include <string>
#include <iostream>
#include "app_platform/help_macros.h"
#include "app_platform/intf_service.h"
#include "intf_acaccountdao.h"

#include "library/basic/singleton_t.h"
#include "library/basic/sync_lock.h"
#include "c2cent/library/log/CWTimeElf3.h"

#include <map>
#include <set>
#include "erp/acaccount/ddo/bankaccountddo_acaccount.h"
#include "erp/acaccount/ddo/bankaccountfilterddo_acaccount.h"

HEADER_SELF_DEFINE_START
/**
*  请在这里增加自定义包含的头文件，否则无法合并代码
**/
using namespace c2cent::library::wtimeelf;
HEADER_SELF_DEFINE_END

namespace erp
{
namespace acaccount
{
namespace dao
{

#define ACACCOUNTDAO_SERVICE_VERSION "ERP_ACACCOUNT_DAO___ACACCOUNTDAO__SERVICE_VERSION__1.0 2013-10-31 18:44:43"
const std::string ACACCOUNTDAO_SERVICE_NOUSE = ACACCOUNTDAO_SERVICE_VERSION;

SERVICE class CACAccountDao : public IACAccountDao{
public:
		CACAccountDao(enum DeployMethod method = DEPLOY_STANDALONE);
		~CACAccountDao();
		 void Reset();
		static int Initialize(IUserDefineCntl* pCntl = NULL);

public:
	 /**
	 *
	 *    通过SysNos获取银行账户信息
	 *
	 */
	EXPORT(0xc0611801) uint32_t GetBankAccountBySysNos(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint64_t> & setSysNoList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint64_t,erp::acaccount::ddo::CBankAccountDdo> & mapBankAccount,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    Filter过滤获取银行账户信息
	 *
	 */
	EXPORT(0xc0611802) uint32_t GetBankAccountByFilter(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::acaccount::ddo::CBankAccountFilterDdo& oBankAccountFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::vector<erp::acaccount::ddo::CBankAccountDdo> & vecBankAccount,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    写入&更新银行账户信息
	 *
	 */
	EXPORT(0xc0611803) uint32_t AddAndUpdateBankAccount(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::acaccount::ddo::CBankAccountDdo& oBankAccount,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 uint64_t& ddwBankAccountSysNo,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    逻辑删除银行账户信息
	 *
	 */
	EXPORT(0xc0611804) uint32_t DeleteBankAccount(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint64_t ddwBankAccountSysNo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    写入&更新经营类会计项目信息
	 *
	 */
	EXPORT(0xc0611805) uint32_t AddAndUpdateACItems(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::acaccount::ddo::CACItemsDdo& oACItemsDdo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 uint64_t& ddwACItemsSysNo,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    逻辑删除经营类会计项目信息
	 *
	 */
	EXPORT(0xc0611806) uint32_t DeleteACItems(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint64_t ddwACItemsSysNo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    通过SysNos获取经营类会计项目信息
	 *
	 */
	EXPORT(0xc0611807) uint32_t GetACItemsBySysNos(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint64_t> & setSysNoList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint64_t,erp::acaccount::ddo::CACItemsDdo> & mapAACItems,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    Filter过滤获取经营类会计项目信息
	 *
	 */
	EXPORT(0xc0611808) uint32_t GetACItemsByFilter(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::acaccount::ddo::CACItemsFilterDdo& oBankAccountFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::vector<erp::acaccount::ddo::CACItemsDdo> & vecACItems,
		 std::string& strOutReserve
		);

SECTION_SELF_DEFINE_START
/**
* 请在这里增加自定义的成员变量和函数，否则无法合并代码
**/
private:
		std::string m_strMachineKey;
        std::string m_strSource;
        std::string m_strClientIP;
        uint32_t m_dwSceneId;
        uint32_t m_dwOperatorUin;

        static CItilGroup m_oGetBankAccount;//银行账户查询ITIL上报对象
        static CItilGroup m_oGetBankAccountByIds;//银行账户ByIds查询ITIL上报对象
        static CItilGroup m_oAddAndUpdateBankAccount;//新增更新银行账户信息ITIL上报对象
        static CItilGroup m_oDeleteBankAccount;//逻辑删除银行账户信息ITIL上报对象
        static CItilGroup m_oAddAndUpdateACItems;//新增更新经营类会计项目信息ITIL对象
SECTION_SELF_DEFINE_END

private:
	enum DeployMethod m_method;
private:
	c2cent::storage::CMySqlStorage m_oStorage;
};

}
}
}

#endif /* _ACACCOUNTDAO_ACACCOUNT_H_ */
